using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;

namespace Xeml.Document
{
    /// <summary>
    /// A base class from where every object in the xeml object tree inherits.
    /// </summary>
    public abstract class XemlAnnotatableObject
    {
        public TaggedAnnotationCollection Annotations { get; private set; }

        public XemlAnnotatableObject()
        {
            this.Annotations = new TaggedAnnotationCollection();
        }

        public XemlAnnotatableObject(XemlAnnotatableObject xo)
        {
            this.Annotations = new TaggedAnnotationCollection(xo.Annotations.Select(x => new TaggedAnnotation(x.Tag, x.Annotation)));
        }
    }
}
